package com.neuedu.service.impl;

import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.neuedu.entity.MedicalInfo;
import com.neuedu.mapper.MedicalInfoMapper;
import com.neuedu.service.MedicalInfoService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 检查检验表 服务实现类
 * </p>
 *
 * @author 王禹
 * @since 2025-08-19
 */
@Service
public class MedicalInfoServiceImpl extends ServiceImpl<MedicalInfoMapper, MedicalInfo> implements MedicalInfoService {

    @Override
    public boolean updateCheck(String no, byte active) {
        UpdateWrapper<MedicalInfo> wrapper = new UpdateWrapper<>();
        wrapper.eq("medical_no", no);
        MedicalInfo medicalInfo = new MedicalInfo();
        medicalInfo.setActive(active);
        return this.update(medicalInfo, wrapper);
    }
}
